{% extends "base.html" %}
{% load static %}

{% block content %}
<h3>Edit API Scan Configuration</h3>
<form class="form-horizontal" enctype="multipart/form-data" method="post">{% csrf_token %}
    {% include "dojo/form_fields.html" with form=form %}
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
            <input class="btn btn-primary" type="submit" value="Submit"/>
        </div>
    </div>
</form>
<div class="alert alert-info">
    API Scan Configurations are supported for these test types.
    <ul>
    {% for hint in api_scan_configuration_hints %}
        <li>
            {% if hint.tool_types.count == 0 %}
                <a id="link_tt_{{ hint.id }}" href="{% url 'add_tool_type' %}?name={{ hint.tool_type_name }}">Parser <b>{{ hint.name }}</b> requires created tool type <b>{{ hint.tool_type_name }}</b>.</a>
            {% elif hint.tool_configurations.count == 0 %}
                <a id="link_tc_{{ hint.id }}" href="{% url 'add_tool_config' %}?tool_type={{ hint.tool_types.first.id }}">Tool type <b>{{ hint.tool_type_name }}</b> exists however parser <b>{{ hint.name }}</b> requires at least one tool configuration.</a>
            {% else %}
                <b>{{ hint.name }}</b>: {{ hint.hint | safe }}
            {% endif %}
        </li>
    {% endfor %}
    </ul>
</div>

{% endblock %}
{% block postscript %}
{% endblock %}
